<!DOCTYPE html>
<html lang="zh-CN">
 <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>后台管理</title>
	<link rel="stylesheet" type="text/css" href="${rc.contextPath}/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="${rc.contextPath}/static/css/flat-ui.css">
    <link rel="stylesheet" type="text/css" href="${rc.contextPath}/static/css/css.css">
	<link rel="stylesheet" href="http://lib.baomitu.com/font-awesome/4.2.0/css/font-awesome.min.css">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//lib.baomitu.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//lib.baomitu.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="${rc.contextPath}/static/js/jquery.min.js"></script>
    <script src="${rc.contextPath}/static/bootstrap/js/bootstrap.min.js"></script>
  	<script src="${rc.contextPath}/static/js/flat-ui.min.js"></script>
	<!--include常量-->
	<#include "/misc/backConstant.ftl">
	<link rel="shortcut icon" href="${rc.contextPath}/static/images/favicon.ico"/>
	<link rel="bookmark" href="${rc.contextPath}/static/images/favicon.ico"/>
</head>
	<body>
          <form id="form" action="${rc.contextPath}/employeeEnter" method="POST">
          
          <div class="login-form form-group row" style="width:50%;margin:50px auto;  ">
            <span style="color:red" id="errorMessage"> ${errorMessage?default("")}</span>
            <div class="col-xs-7">
            	<div class="form-group">
              		<input type="text" name="code" class="form-control login-field" value="${code?default("")}" placeholder="请输入您的登录名" id="login-name" />
              		<label class="login-field-icon fui-user" for="login-name"></label>
            	</div>
            

            <div class="form-group">
              <input type="password" name="password" class="form-control login-field" value="" placeholder="请输入您的密码" id="login-pass" />
              <label class="login-field-icon fui-lock" for="login-pass"></label>
            </div>
            
            <div class="form-group">
              <input type="text" name="verifyCode" class="form-control login-field" value="" placeholder="请输入验证码" id="login-code" />
              <label class="login-field-icon fui-eye" for="login-code"></label>
              <a href="#" onclick="reloadCode();"><img src="${rc.contextPath}/verifyCodeImage" title='<@i18n.message "global.invisibility.image"/>' id="verifyCodeImage" border="0"/></a>
            </div>

            <button type="button" id="btnSave" class="btn btn-primary btn-lg btn-block">登录</button>
            </div>
            
            <br/><img src="${rc.contextPath}/static/images/ddzj_logo.png" width="450"/>
          </div>
          <input type="hidden" name="inputUrl" value="/employeeLoginForm"/>
          </form>
<script>
	function reloadCode() {
		var i = Math.random();
		document.getElementById("verifyCodeImage").src="${rc.contextPath}/verifyCodeImage?" + i;
	}
	
	$(function () {
		
		if($("#errorMessage").text()==""){
			$("#errorMessage").hide();
		}
		$("#btnSave").click(function(){
			if($("#login-name").val() == ""){
				$("#errorMessage").html("请输入您的登录名");
				$("#errorMessage").show();
				return false;
			}
			if($("#login-pass").val() == ""){
				$("#errorMessage").html("请输入您的密码");
				$("#errorMessage").show();
				return false;
			}
			if($("#login-code").val() == ""){
				$("#errorMessage").html("请输入验证码");
				$("#errorMessage").show();
				return false;
			}
			$("#form").submit();
		});
	});
</script>
</body>
</html>